import request from '../utils/request'

// 获取部门数据
export function grtDeptsList() {
  return request({
    url: '/company/department'
  })
}

// 新增部门
export function addDepts(data) {
  return request({
    method: 'post',
    url: '/company/department',
    data
  })
}

// 删除部门
export function delDepts(id) {
  return request({
    method: 'DELETE',
    url: `/company/department/${id}`
  })
}

// 根据id获取部门信息
export function IDgetDepartment(id) {
  return request({
    url: `/company/department/${id}`
  })
}

// 修改部门
export function deltDepts(data) {
  return request({
    method: 'put',
    url: `/company/department/${data.id}`,
    data
  })
}
